package jp.ne.hatena.d.digitalsoul.warikan.contexts

import jp.ne.hatena.d.digitalsoul.warikan.contexts.rootpopulaters._
import jp.ne.hatena.d.digitalsoul.warikan.models._
import jp.ne.hatena.d.digitalsoul.warikan.repositories._
import jp.ne.hatena.d.digitalsoul.warikan.roles._

class Planning(val id:Int) extends PartyPopulater {
	
	val planner:Planner = new Party(id) with Planner
	
	val party:Party = populateParty(planner)
		
	def addPerticipant(name:String, role:String) = 
		planner.addParticipant(new Participant(name, role))
	
	def number:Int = planner.number
	
	def commit = PartyRepository.add(party) 
	
}